<?php

namespace app\api\controller;

use app\common\controller\Api;
use app\common\model\SystemSetting;


class Setting extends Api
{

    public function getSystemSetting ()
    {
        $result = [
            'status' => true,
            'msg' => '获取成功',
            'data' => []
        ];

        $systemSettingModel = new SystemSetting();
        $result['data'] = $systemSettingModel->select();
        $info = [];
        foreach($result['data'] as $key => $val){
            $info[$val['skey']] = $val['value'];
        }
        $result['data'] = $info;
        return $result;
    }
}